package com.econ.powercloud.ems.common.enums;

public enum ComplexEnums {
    COMPLEX(1,"复合计算"),
    COMMON(0,"普通计算"),
    CHARGE(2,"累计充放电点号"),
    ;

    private Integer code;
    private String desc;

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    ComplexEnums(Integer code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static ComplexEnums fromCode(Integer code){
        for(ComplexEnums type: ComplexEnums.values()){
            if(type.getCode().equals(code)){
                return type;
            }
        }
        return null;
    }
}
